{% if ansible_distribution == 'CentOS' %}
check process MARIADB with pidfile /var/run/mariadb/mariadb.pid
  start program = "/usr/sbin/service mariadb start"
  stop program = "/usr/sbin/service mariadb stop"
  if failed
    port 3306
  for 10 cycles then restart
  if 2 restarts within 20 cycles then unmonitor
{% else %}
check process MYSQL with pidfile /var/run/mysqld/mysqld.pid
  start program = "/usr/sbin/service mysql start"
  stop program = "/usr/sbin/service mysql stop"
  if failed
    port 3306
  for 10 cycles then restart
  if 2 restarts within 20 cycles then unmonitor
{% endif %}
